#pragma once
#include"AVL_node.h"
#include"Search_tree.h"

template<class Record>
class AVL_tree : public Search_tree<Record>
{
public:
	Error_code insert(const Record& new_data);
	Error_code remove(const Record& old_data);
	Error_code avl_insert(Binary_node<Record>*& sub_root, const Record& new_data, bool& taller);
	int height();
	int recursive_height(Binary_node<Record>* sub_root);
	Binary_node near_leaf();
	Binary_node recursive_near_leaf(Binary_node<Record>* sub_root,int &depth);

};